﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace PublisherManagementSystem.Models
{
	public class City
	{
		public int CityID { get; set; }

		[Required(ErrorMessage = "城市名称不能为空")]
		[Display(Name = "城市")]
		[StringLength(50, ErrorMessage = "城市名称不能超过50个字符")]
		public string CityName { get; set; }

		public int ProvinceID { get; set; }

		// 导航属性
		public virtual Province Province { get; set; }
		public virtual ICollection<District> Districts { get; set; }
	}
}
